<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024-06-20
  Time: 11:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<% String path=request.getContextPath();
UserInfo userInfo=(UserInfo) request.getSession().getAttribute("userInfo");
%>
<form action="<%=path%>/update" method="post">
  <%--<form action="/javaweb_02/add" method="get">--%>
  <input type="text" name="id" placeholder="请输入用户编号" value="<%=userInfo.getId()%>"><br>
  <input type="text" name="userName" placeholder="请输入用户名称" value="<%=userInfo.getUserName()%>"><br>
  <input type="text" name="userPhone" placeholder="请输入用户手机" value="<%=userInfo.getUserPhone()%>"><br>

  <% if(1 == userInfo.getUserSex()) {%>
  <input type="radio" name="userSex" value="1" checked>男
  <input type="radio" name="userSex" value="2">女<br>
  <% } else {%>
  <input type="radio" name="userSex" value="1">男
  <input type="radio" name="userSex" value="2" checked>女<br>
  <% } %>

  <input type="submit" value="提交">
  <a href="<%=path%>/jsp/home.jsp">取消</a>
</form>
</body>
</html>
